// import VConsole from 'vconsole'
// const vConsole = new VConsole();

import Vue from 'vue'
import App from '@/App.vue'
import router from './router'
import store from './store'
import Vant from 'vant'
import 'vant/lib/index.css';
import XhAggregation from '@/common/aggregation-sdk'
// 引入模块后自动生效
import '@vant/touch-emulator';
import {
	Toast,
} from 'vant';

import {
	handlePagination,
} from '@/utils/index';

import vueEsign from 'vue-esign'
Vue.use(vueEsign)

import {
	Result,
	Steps,
	Step,
	Card,
	Table,
	TableColumn,
	Alert,
	Descriptions,
	DescriptionsItem,
	Breadcrumb,
	BreadcrumbItem,
	Dialog,
	DatePicker,
	Input,
	Tooltip,
} from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

Vue.use(Steps);
Vue.use(Step);
Vue.use(Result);
Vue.use(Card);
Vue.use(Table);
Vue.use(TableColumn);
Vue.use(Alert);
Vue.use(Descriptions);
Vue.use(DescriptionsItem);
Vue.use(Breadcrumb);
Vue.use(BreadcrumbItem);
Vue.use(Dialog);
Vue.use(DatePicker);
Vue.use(Input);
Vue.use(Tooltip);
Vue.config.productionTip =false;
window.XhAggregation = XhAggregation;
window.commonHandlePagination = handlePagination;
Vue.use(Vant);
Toast.setDefaultOptions("loading", {
	message: '加载中...',
	text: '加载中...',
	forbidClick: true,
	duration: 45000,
	overlay: true,
});
Toast.allowMultiple(); //多个toast实例，保证loading，跟toast可以同时存在
// 加载组件库-------------------开始
/* let modulesFiles= require.context('@/components', true, /\.vue$/)
const modules = modulesFiles.keys().reduce((modules, modulePath) => {
	const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1').split('/')[0]
	const value = modulesFiles(modulePath)
	modules[moduleName] = value.default
	Vue.component(moduleName, value.default)
	return modules
}, {}); */
// 加载组件库-------------------结束
new Vue({
	router,
	store,
	render: h => h(App)
}).$mount('#app')
